<template>
	<view>
		<view class="header">
			<view class="head">
				<view class="header-t">操作时间</view>
				<view class="header-b">{{ arry.create_time | birtime }}</view>
			</view>
			<view class="head">
				<view class="header-t">状态</view>
				<view class="header-b">出库</view>
			</view>
			<view class="head">
				<view class="header-t">操作人</view>
				<view class="header-b">{{ arry.user_name }}</view>
			</view>
			<view class="head">
				<view class="header-t">本次总出库</view>
				<view class="header-b">{{ arry.out_number }}/共一种货品</view>
			</view>
			<view class="head">
				<view class="header-t">物流</view>
				<view class="header-b">{{ arry.delivery_name }}</view>
			</view>
			<view class="head">
				<view class="header-t">单号</view>
				<view class="header-b">{{ arry.delivery_no }}</view>
			</view>
		</view>
		<view class="box" v-for="item in add.goods_list">
			<view class="box-one">
				<image :src="item.cover" mode=""></image>
				<view class="box-two">
					<view class="">{{item.title}}(名称)</view>
					<view class="">本次出货数量: 1</view>
				</view>
			</view>
			<view class="box-three">
				<view class="min-box">规格</view>
				<view class="min-box">出货数量</view>
			</view>
			<view class="box-three" v-for="item in item.product_list">
				<view class="min-box">{{item.spec_data[0]+'/'+item.spec_data[1]}}</view>
				<view class="min-box">{{item.operate_num}}</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			arry: '',
			add: ''
		};
	},
	onLoad() {
		this.arry = uni.getStorageSync('log');
		// console.log(this.arry);
		this.showShop();
	},
	methods: {
		showShop() {
			this.$ajax('api/v1.stock/info', {
				operate_id: this.arry.operate_id
			})
				.then(res => {
					// console.log(res);
					this.add = res.result;
					console.log(this.add);
				})
				.catch(res => {
					console.log(Error);
				});
		},
			
		image(){
			
		}
	}
};
</script>

<style lang="scss">
page {
	background-color: #f5f5f5;
}
.header {
	margin-bottom: 20rpx;
}
.head {
	height: 108rpx;
	line-height: 108rpx;
	background-color: #ffffff;
	box-sizing: border-box;
	padding: 0 34rpx;
	display: flex;
	justify-content: space-between;
	border-bottom: 2upx #eee solid;
}
.header-t {
	font-size: 32rpx;
	font-family: PingFang SC;
	font-weight: 500;
}
.header-b {
	font-size: 32rpx;
	font-family: PingFang SC;
	font-weight: 500;
	color: #666666;
}
.box {
	background-color: #ffffff;
	padding: 40rpx 0;
	padding-bottom: 0;
	box-sizing: border-box;
	.box-one {
		display: flex;
		padding: 0 30upx 30upx 30upx;
		image {
			width: 130rpx;
			height: 130rpx;
			margin-right: 30rpx;
		}
		.box-two {
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: rgba(51, 51, 51, 1);
			line-height: 64rpx;
		}
	}
	.box-three {
		display: flex;
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: rgba(51, 51, 51, 1);
		height: 110rpx;
		line-height: 110rpx;
		justify-content: space-between;
		border-top: 2rpx solid #eee;
		text-align: center;

		.min-box {
			width: 55%;
			text-align: center;
		}
	}
}
</style>
